home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Python 1.1 / Demo / turing / double.tm < prev    next >
Encoding:
Text File  |  1994-04-28  |  392 b   |  21 lines  |  [TEXT/R*ch]

  1. ; This turing machine doubles its input.  Useful to check that dynamic
  2. ; strings work.  On output, the tape head will point to the result.
  3. ;
  4.  
  5. <1, 'a'> --> <1, '#'>
  6. <1, '#'> --> <2, R>
  7. <1, ' '> --> <0, R>
  8.  
  9. <2, 'a'> --> <2, R>
  10. <2, ' '> --> <3, R>
  11.  
  12. <3, 'a'> --> <3, R>
  13. <3, ' '> --> <4, 'a'>
  14.  
  15. <4, 'a'> --> <4, R>
  16. <4, ' '> --> <5, 'a'>
  17.  
  18. <5, 'a'> --> <5, L>
  19. <5, ' '> --> <5, L>
  20. <5, '#'> --> <1, R>
  21.